package com.mms.service;

import com.baomidou.mybatisplus.service.IService;
import com.mms.pojo.Medical;
import com.mms.pojo.Reserve;
import com.mms.pojo.UserInfo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author 陈林鹏
 * @since 2021-04-14
 */
public interface IReserveService extends IService<Reserve> {


    /**
     * 医生拒绝处理
     *
     * @param id
     * @throws Exception
     */
    void refuseProcessing(UserInfo userInfo, Integer[] id) throws Exception;

    /**
     * 获取用户结束的预约
     *
     * @param patient
     * @return
     */
    List<Map<String, Object>> completed(UserInfo patient);

    /**
     * 获取的预约
     *
     * @param patient
     * @return
     */
    List<Map<String, Object>> patientShow(UserInfo patient
            , Medical medical
            , boolean be
            , Integer... key);


    List<Map<String, Object>> patientShow(boolean be
            , Integer... key);

    List<Map<String, Object>> patientShow(UserInfo patient
            , boolean be
            , Integer... key);

    List<Map<String, Object>> patientShow(Medical medical
            , boolean be
            , Integer... key);

    /**
     * 用户预约
     *
     * @param userInfo
     * @param reserve
     * @return
     */
    boolean makeAppointment(UserInfo userInfo, Reserve reserve);

    /**
     * 用户取消预约
     *
     * @param userInfo
     * @param reserveIds
     * @return
     */
    boolean cancelReservation(UserInfo userInfo, int[] reserveIds);

    /**
     * 医生接受预约
     *
     * @param medical
     * @param id
     * @return
     * @throws Exception
     */
    boolean acceptAppointment(Medical medical, Integer[] id) throws Exception;
}
